package DDB;
/** 包装类的演示 */
public class IntegerDemo {
    public static void main(String[] args) {
      /* int max=Integer.MAX_VALUE;
       int min=Integer.MIN_VALUE;
        System.out.println("int最大值："+max+"int最小值："+min);
        long max1=Long.MAX_VALUE;
        long min1=Long.MIN_VALUE;
        System.out.println("Long最大值："+max1+"Long最小值："+min1);

        String q="1";
        int age=Integer.parseInt(q);
        System.out.println(age);
        String w="4124123.1524213";
        double price=Double.parseDouble(w);
        System.out.println(price);*/

        Integer a=new Integer(1);
        Integer s=new Integer(1);
        System.out.println(a==s);
        System.out.println(a.equals(s));
        Integer i = 2;
        int j = i;

        Integer d=Integer.valueOf(2);
        Integer f=Integer.valueOf(2);
        System.out.println(d==f);
        System.out.println(d.equals(f));

        double z=f.doubleValue();
        System.out.println(z);




















































        /*int max = Integer.MAX_VALUE;
        int min = Integer.MIN_VALUE;
        System.out.println("int的最大值为:"+max+"，最小值为:"+min);
        long max1 = Long.MAX_VALUE;
        long min1 = Long.MIN_VALUE;
        System.out.println("long的最大值为:"+max1+"，最小值为:"+min1);

        String s1 = "39";
        int age = Integer.parseInt(s1);
        System.out.println(age);
        String s2 = "123.456";
        double price = Double.parseDouble(s2);
        System.out.println(price);
        /*
        Integer i = 5;
        int j = i;
        */

        /*
        Integer i1 = new Integer(5);
        Integer i2 = new Integer(5);
        System.out.println(i1==i2);
        System.out.println(i1.equals(i2));


        Integer i3 = Integer.valueOf(5);
        Integer i4 = Integer.valueOf(5);
        System.out.println(i3==i4); //true
        System.out.println(i3.equals(i4));


        int i = i4.intValue();
        System.out.println(i);
        */
    }
}



















